home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 June
/
EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso
/
earcd
/
c-lang
/
vbcc.lha
/
vbcc
/
machine.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-05-15
|
4KB
|
139 lines
/* $VER: vbcc (machine.h amiga68k) V0.3 */
/* Typen des Zielrechners auf dem Rechner des Compilers */
typedef signed char zchar;
typedef unsigned char zuchar;
typedef signed short zshort;
typedef unsigned short zushort;
typedef signed int zint;
typedef unsigned int zuint;
typedef signed long zlong;
typedef unsigned long zulong;
typedef float zfloat;
typedef double zdouble;
typedef void *zpointer;
/* maschinenabhaengige Routinen fuer Typkonversion auf Datentypen */
/* des Zielcodes */
#define zc2zl(x) ((zlong)(x))
#define zs2zl(x) ((zlong)(x))
#define zi2zl(x) ((zlong)(x))
#define zl2zc(x) ((zchar)(x))
#define zl2zs(x) ((zshort)(x))
#define zl2zi(x) ((zint)(x))
#define zl2zul(x) ((zulong)(x))
#define zuc2zul(x) ((zulong)(x))
#define zus2zul(x) ((zulong)(x))
#define zui2zul(x) ((zulong)(x))
#define zul2zuc(x) ((zuchar)(x))
#define zul2zus(x) ((zushort)(x))
#define zul2zui(x) ((zuint)(x))
#define zul2zl(x) ((zlong)(x))
#define zf2zd(x) ((zdouble)(x))
#define zd2zf(x) ((zfloat)(x))
#define zl2zd(x) ((zdouble)(x))
#define zd2zl(x) ((zlong)(x))
#define zul2zd(x) ((zdouble)(x))
#define zd2zul(x) ((zulong)(x))
#define zul2zp(x) ((zpointer)(x))
#define zp2zul(x) ((zulong)(x))
/* maschinenabhaengige Routinen, um Typen des Compiler in Typen des */
/* Zielcodes zu konvertieren */
#define l2zl(x) ((zlong)(x))
#define zl2l(x) ((long)(x))
#define ul2zul(x) ((zulong)(x))
#define zul2ul(x) ((unsigned long)(x))
#define d2zd(x) ((zdouble)(x))
#define zd2d(x) ((double)(x))
/* maschinenabhaengige Rechenroutinen fuer Datentypen des */
/* Zielcodes */
#define zlmult(a,b) ((a)*(b))
#define zulmult(a,b) ((a)*(b))
#define zdmult(a,b) ((a)*(b))
#define zldiv(a,b) ((a)/(b))
#define zuldiv(a,b) ((a)/(b))
#define zddiv(a,b) ((a)/(b))
#define zlmod(a,b) ((a)%(b))
#define zulmod(a,b) ((a)%(b))
#define zllshift(a,b) ((a)<<(b))
#define zullshift(a,b) ((a)<<(b))
#define zlrshift(a,b) ((a)>>(b))
#define zulrshift(a,b) ((a)>>(b))
#define zladd(a,b) ((a)+(b))
#define zuladd(a,b) ((a)+(b))
#define zdadd(a,b) ((a)+(b))
#define zlsub(a,b) ((a)-(b))
#define zulsub(a,b) ((a)-(b))
#define zdsub(a,b) ((a)-(b))
#define zpleq(a,b) ((a)<=(b))
#define zlleq(a,b) ((a)<=(b))
#define zulleq(a,b) ((a)<=(b))
#define zdleq(a,b) ((a)<=(b))
#define zleq(a) ((a)==0)
#define zuleq(a) ((a)==0)
#define zdeq(a) ((a)==0)
#define zdeqto(a,b) ((a)==(b))
#define zleqto(a,b) ((a)==(b))
#define zuleqto(a,b) ((a)==(b))
#define zpeqto(a,b) ((a)==(b))
#define zpeq(a) ((a)==0)
#define zlor(a,b) ((a)|(b))
#define zulor(a,b) ((a)|(b))
#define zland(a,b) ((a)&(b))
#define zuland(a,b) ((a)&(b))
#define zlxor(a,b) ((a)^(b))
#define zulxor(a,b) ((a)^(b))
#define zlkompl(a) (~(a))
#define zulkompl(a) (~(a))
#define zdkompl(a) (~(a))
#define zlneg(a) (-(a))
#define zulneg(a) (-(a))
#define zdneg(a) (-(a))
/* Struktur fuer erweiterte Adressierungsarten */
struct AddressingMode{
int basereg;
long dist;
int skal;
int dreg;
};
/* Anzahl der Register */
#define MAXR 24
/* Anzahl der Optionsflags fuer den Codegenerator */
#define MAXGF 20
/* Soll der Compiler ICs mit z=q2 erzeugen? */
#define USEQ2ASZ 0
/* Welcher Typ wird mindestens fuer ADDI2P etc. benoetigt */
#define MINADDI2P 2 /* short */
/* Steht das hoechstwertige Byte eines Integers an erster Stelle? */
/* Wenn nicht, wird z.Z. angenommen, dass es genau umgedreht ist. */
/* Eine andere Darstellung wird Probleme bei Funktionsparametern */
/* machen. */
#define BIGENDIAN 1
/* Sollen switch-statements als Folge von SUB/TEST statt COMPARE */
/* erzeugt werden? */
#define SWITCHSUBS 1
/* bis zu welcher Groesse sollen memcpy/strcpy-Aufrufe durch */
/* ASSIGN-ICs implementiert werden? */
#define INLINEMEMCPY (1<<30)
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 20
#endif
#ifndef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#endif